package com.dy.course.enumerate;

public enum Level {

	UNIVERSITY(1, "大学"), FACULTY(1, "院系"), MAJOR(3, "专业"), CLASS(4, "班级");

	private Integer code;
	private String desc;

	private Level(Integer code, String desc) {
		this.code = code;
		this.desc = desc;
	}

	public Integer getCode() {
		return this.code;
	}

	public String getDesc() {
		return this.desc;
	}

	public boolean isCorrent(Integer code) {
		Level[] mses = Level.values();
		for (Level ms : mses) {
			if (ms.getCode() == code) {
				return true;
			}
		}
		return false;
	}
}
